
#ifndef _H264_VIDEO_SERVER_MEDIA_SUBSESSION_HH
#define _H264_VIDEO_SERVER_MEDIA_SUBSESSION_HH

#include "RealMediaSubsession.hh"

class H264VideoServerMediaSubsession: public RealMediaSubsession {
public:
	static H264VideoServerMediaSubsession*
	createNew(UsageEnvironment& env, MediaInput& input, unsigned estimatedBitrate);

	void setDoneFlag() { fDoneFlag = ~0; }
	void checkForAuxSDPLine1();

private:
	H264VideoServerMediaSubsession(UsageEnvironment& env, MediaInput& input,
				     unsigned estimatedBitrate);
      // called only by createNew()
	virtual ~H264VideoServerMediaSubsession();

private: // redefined virtual functions
	virtual char const* getAuxSDPLine(RTPSink* rtpSink,
				    FramedSource* inputSource);
	virtual FramedSource* createNewStreamSource(unsigned clientSessionId,
					      unsigned& estBitrate);
	virtual RTPSink* createNewRTPSink(Groupsock* rtpGroupsock,
                                    unsigned char rtpPayloadTypeIfDynamic,
				    FramedSource* inputSource);

private:
	char fDoneFlag; // used when setting up 'SDPlines'
	RTPSink* fDummyRTPSink; // ditto
};

#endif
